<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: hiugiak
  Date: 2018-12-15
  Time: 18:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="../../includes/framework-headers.jsp"/>
    <jsp:include page="../../includes/framework-navbar-teacher.jsp">
        <jsp:param name="navSelection" value="1-1"/>
    </jsp:include>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/components/form-file.almost-flat.min.css"/>
    <script src="${pageContext.request.contextPath}/js/student/dialog_doc_submission.js"></script>

    <title>毕业设计指导网站 - 学生进度</title>
</head>
<body>
<div class="gpg-middle">
    <div class="uk-container uk-container-center">
        <div class="uk-grid" data-uk-grid-margin>
            <jsp:include page="../../includes/framework-nav-panel-teacher.jsp">
                <jsp:param name="navSelection" value="1-1"/>
            </jsp:include>

            <div class="uk-width-medium-3-4">
                <article class="uk-article">
                    <h1 class="uk-article-title">学生进度 - ${student.name}</h1>
                    <hr>
                    <dl class="uk-description-list-line">
                        <c:forEach var="phase" items="${phaseList}">
                            <dt>${phase.plan.name}
                                <c:choose>
                                    <c:when test="${phase.plan.requireDocument}">
                                        <c:choose>
                                            <c:when test="${phase.documentInfo == null}">
                                                <span class="uk-text-muted">无提交文件</span>
                                            </c:when>
                                            <c:otherwise>
                                                <a href="${pageContext.request.contextPath}/studentDoc/download/${phase.documentInfo.fileId}">${phase.documentInfo.fileName}</a>
                                            </c:otherwise>
                                        </c:choose>
                                    </c:when>
                                    <c:otherwise>
                                        <span class="uk-text-muted">无文件要求</span>
                                    </c:otherwise>
                                </c:choose>
                            </dt>
                            <dd><fmt:formatDate value="${phase.plan.startDate}" pattern="yyyy-MM-dd"/> | <fmt:formatDate value="${phase.plan.endDate}" pattern="yyyy-MM-dd"/></dd>
                        </c:forEach>
                    </dl>
                </article>
            </div>
        </div>
    </div>
</div>
</body>
</html>
